<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <title>玉灵 QQ:7031633 Email:webrx@126.com</title>
    <meta content="关键字" name="keywords">
    <meta content="简介" name="description">
</head>

<body>
<div class="tt"></div>
<script>
    let f = (i, n = 2) => i.toString().padStart(n, 0)
    console.log(f(3), f(3, 6), f(15, 3))
    let t = () => {
        let d = new Date()
        document.querySelector('.tt').innerHTML = [f(d.getHours()), f(d.getMinutes()), f(d.getSeconds()), f(d.getMilliseconds(), 3)].join(':')
    }
    t()
    let tt = setInterval(t, 10)
    setTimeout(() => {
        clearInterval(tt)
    }, 1000 * 5)
</script>
</body>
</html>
